// 用户相关模拟数据
const Mock = require("mockjs");
const { Random } = Mock;

// 生成用户数据
function generateUserData() {
  return Mock.mock({
    id: Random.id(),
    username: Random.title(),
    nickname: Random.cname(),
    email: Random.email(),
    avatar: Random.image('100x100'),
    createTime: Random.datetime(),
  });
}

// 生成用户列表
function generateUserList(count = 10) {
  const list = [];
  for (let i = 0; i < count; i++) {
    list.push(generateUserData());
  }
  return list;
}

module.exports = {
  generateUserData,
  generateUserList,
};
